package algorithms.sort;


import java.util.Arrays;

public class GetRandomArr {
    public static void main(String[] args) {
        System.out.println(Arrays.toString(getRandomArr(10)));
    }

    /**
     * 获取指定个数的随机整数数组，整数值在1-10000
     * @param count
     * @return
     */
    public static int[] getRandomArr(int count){
        int[] arr = new int[count];
        for (int i=0;i < count;i++) {
            arr[i] = (int)(Math.random()*10000+1);
        }
        return arr;
    }

    /**
     * 获取指定个数的随机整数数组，整数值在1-100
     * @param count
     * @return
     */
    public static int[] getRandomArr100(int count){
        int[] arr = new int[count];
        for (int i=0;i < count;i++) {
            arr[i] = (int)(Math.random()*100+1);
        }
        return arr;
    }

}
